[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
A_COPY()
Copy all or a portion of one array into another existing array
-------------------------------------------------------------------------------
Syntax
A_COPY( <aSource>,
<aTarget>,
[<idxPos>],
[<nCount>],
[<nTargetPos>] )
Arguments
<aSource> is the array that will be copied from.
<aTarget> is the array that will be copied to.
<idxPos> is the element in <aSource> where the copy will begin. The
default is the first element in the array.
<nCount> is the number of elements to copy. The default is all
elements starting at <idxPos> until the end of the array.
<nTargetPos> is the starting element position in the target array.
Returns
None.
Description
A_COPY() copies the contents of one array into another. This is
different than Clipper's ACOPY() which copies references to nested
array elements. Because there are no nested array elements in a
FlexFile array, the copy includes the smaller of the range
specified and the size of the arrays.
Examples
// Declare a two dimensional (UL)ong integer array
LOCAL rows, cols
rows = 10
cols = 20
aSource = A_DECLARE( "UL", rows, cols )
aTarget = A_DECLARE( "UL", rows, cols )
// Fill the 5th row with 100,000 and the 6th row
// with 200,000.
A_FILL( aSource, 100000, A_(5, 1), cols )
A_FILL( aTarget, 200000, A_(6, 1), cols )
// Copy the 5th and 6th rows to the 2nd/3rd row of the target
A_COPY( aSource, aTarget, A_(5, 2), cols * 2, A_(2, 1) )
See Also:
A_SIZE()
A_INS()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson